<div class="iprepair-container">
	<div class="form-horizontal">
		<div {{bind-attr class=":alert alertType saveResult::hide"}}><strong>{{saveResult}}</strong></div>
		{{!-- <fieldset class="fieldset-innerlib"> --}}
			{{!-- <legend>内置库配置</legend> --}}
			{{!-- <div class="control-group"> --}}
				{{!-- <label class="control-label">自定义IP地理位置库 --}}
					{{!-- {{input type="checkbox" checked=form.isDedicate tooltip="如果勾选，表示启用内置库"}} --}}
				{{!-- </label> --}}
				{{!-- <button class="u-btn-blue iprepair-uploader-btn" {{action "innerLibDialog"}}>上传</button>
				<button class="u-btn-blue iprepair-save-btn" {{action "save"}}>保存</button> --}}
			{{!-- </div> --}}
			{{!-- <div class="control-group">
				<div class="controls">
					<button class="btn btn-primary" {{action "save"}}>保存</button>
					<button class="btn" {{action "innerLibDialog"}}>上传</button>
				</div>
			</div> --}}
		{{!-- </fieldset> --}}
		<fieldset class="fieldset-ipaddr">
			<div class="control-group fieldset-ipaddr-ip">
				<label class="iprepair-queryform-label">IP:</label>
				<div class="config-iprepair-controls">{{input class="input u-input-blue input-ip" placeholder="请输入IP" value=form.startIp1 }}</div>

				<label class="iprepair-queryform-label ipaddr-remark">备注</label>
				<div class="config-iprepair-controls">
					{{input class="input u-input-blue input-comment" value=form.memo1 tooltip="备注"}}
					{{!-- <button class="u-btn-blue" {{action "queryIpArea"}}>查询</button> --}}
				</div>
			</div>
			<div class="control-group search-row mt20">
				<label class="iprepair-queryform-label">地址:</label>
				<div class="config-iprepair-controls">
					{{view view.AreaSelect needCounty=true areaCode=form.areaCode1}}
				</div>
			</div>

			<div class="control-group search-btn-row">
				<button class="u-btn-blue" {{action "openDialog"}}>添加</button>
				<button class="u-btn-blue" {{action "leadInDialog"}}>批量导入</button>
			{{!-- 	<button class="u-btn-blue">批量导出</button> --}}
				<button class="u-btn-blue" {{action "moduledownload"}}>模板下载</button>
			</div>

			<div class="control-group serach-gird-row iprepair-grid-row">

				{{!-- <table class="conf-table conf-iprepair-tab">
					<tr>
						<th width="23%">IP</th>
						<th width="23%">地图</th>
						<th width="23%">备注</th>
						<th>操作</th>
					</tr>
				 	{{#each ipArealists as |ipArealist|}}
					<tr class="iprepair-table-tr">
						<td class="">
							{{ipArealist.startIp}}
							{{#if  ipArealist.endIp}}
								- {{ipArealist.endIp}}
							{{/if}}
						</td>
						<td class="">
							{{ipArealist.areaName}}
						</td>
						<td class="">
							{{ipArealist.memo}}
						</td>
						<td class="">
							<button class="u-btn-blue" title="编辑" {{action "updOpenDialog" ipArealist}}>编辑</button>
							<button class="u-btn-danger" title="删除" {{action "delIpArea" ipArealist.id}}>删除</button>
						</td>
					</tr>
					{{/each}}
  				</table> --}}

				{{view view.Grid
					columns=gridColumns
					content=ipArealists
					allowPaging=true
					pageIndex=pageIndex
					pageSize=pageSize
					totalRows=totalRows
					allowSorting=true
					pageIndexChanged="pageIndexChanged"
					class="conf-table conf-iprepair-tab"}}
			</div>
		</fieldset>
	</div>
</div>

{{#view view.Dialog
	id="iprepair_upd"
	title="IP维护信息修改" 
	class="hide"
	autoOpen=false
	modal=true
	width=550
	height=300
	resizable=false
	buttons=dialogButtons}}
	<div id="dialog">
		<div {{bind-attr class=":alert alertType saveResult::hide"}}><strong>{{saveResult}}</strong></div>
		<div class="control-group">
			{{!-- <label class="control-label">IP地址范围</label> --}}
			<div class="controls">
				<label class="iprepair_add_title">IP地址范围</label>
				<div class="iprepair_add_content iprepair_add_ip">
					{{input class="input span3 u-input-blue" placeholder="IP地址开始" value=form.startIp}}
					<span class="cfff">&nbsp;&nbsp;一&nbsp;&nbsp;</span>
					{{input class="input span3 u-input-blue" placeholder="IP地址结束" value=form.endIp tooltip="IP地址范围，如192.168.0.1"}}
				</div>
			</div>
		</div>
		<div class="control-group">
			<label class="iprepair_add_title">位置</label>
			<div class="iprepair_add_content iprepair_add_addr">
				{{view view.parentView.AreaSelect needCounty=true areaCode=form.areaCode}}
			</div>
		</div>
	
		<div class="control-group">
			<label class="iprepair_add_title">备注</label>
			<div class="iprepair_add_content iprepair_add_comment">
				{{input class="u-input-blue input" value=form.memo
					tooltip="备注"}}
			</div>
		</div>
		<div class="control-group">
			<div class="iprepair_add_content iprepair_add_save">
				<button type="submit" {{action "updIpArea" }} class="u-btn-blue">保存</button>
				<button type="button" {{action "closeDialog" "2"}} class="u-btn-blue">取消</button>
			</div>
		</div>
	</div>	
{{/view}}

{{#view view.Dialog
	id="iprepair_add"
	title="IP维护信息添加" 
	class="hide iprepair_infoAdd"
	autoOpen=false
	modal=true
	width=550
	height=300
	resizable=false
	buttons=dialogButtons}}
	<div id="dialog">
		<div {{bind-attr class=":alert alertType formTip::hide"}}><strong>{{formTip}}</strong></div>
		<div class="control-group">
			<label class="iprepair_add_title">IP地址范围</label>
			<div class="iprepair_add_content iprepair_add_ip">
				{{input class="input u-input-blue" placeholder="IP地址开始" value=form.startIp}}
				<span class="cfff">&nbsp;&nbsp;一&nbsp;&nbsp;</span>
				{{input class="input u-input-blue" placeholder="IP地址结束" value=form.endIp tooltip="IP地址范围，如192.168.0.1"}}
			</div>	
		</div>

		<div class="control-group">
			<label class="iprepair_add_title">位置</label>
			<div class="iprepair_add_content iprepair_add_addr">
				{{view view.parentView.AreaSelect needCounty=true areaCode=form.areaCode}}
			</div>
		</div>
		
		<div class="control-group">
			<label class="iprepair_add_title">备注</label>
			<div class="iprepair_add_content iprepair_add_comment">
				{{input class="input u-input-blue" value=form.memo
					tooltip="备注"}}
			</div>
		</div>
			
		<div class="control-group">
			<div class="iprepair_add_content iprepair_add_save">
				<button type="submit" {{action "addIpArea"}} class="u-btn-blue">确定</button>
				<button type="button" {{action "closeDialog" "1"}} class="u-btn-blue">取消</button>
			</div>
		</div>
	</div>	
{{/view}}

{{#view view.Dialog
	id="config-iprepair-leadIn"
	title="IP地理位置库导入"
	class="config-modulel7-dialog1 hide"
	autoOpen=false
	modal=true
	width=500
	height=300
	resizable=false
	buttons=dialogButtons}}
	<div id="dialog" {{bind-attr class="showImg:hide"}}>
		{{!-- <div {{bind-attr class=":alert alertType formTip::hide"}}><strong>{{formTip}}</strong></div> --}}
		<form enctype="multipart/form-data" name="leadForm" id="leadForm" target="ipfixIframe">
			<div class="control-group">
				<div class="controls mt10">
					<div class="fileControls">
					  <input type="file" id="File" name="soFile" value="form.soFile" onChange="document.getElementById('FileText').value = this.value;"   />
					</div>
					<label class="inline">上传IP地理位置库csv文件(GBK):</label>
					<input type="text"  id="FileText" class="u-input-blue"/>
					<span class="input-group-btn">
		              <button class="u-btn-blue" onclick="document.getElementById('File').click();">浏 览</button>
		            </span>
				</div>
				<p class="errorInfoTip">
					<span {{bind-attr class="formTip::hide"}}>{{formTip}}</span>
				</p>
			</div>
			<div class="control-group mt30">
				<div class="controls">
					<button type="button" {{action "leadIn"}}   class="u-btn-blue">导入</button>
					<button type="button" {{action "closeDialog" "3"}} class="u-btn-blue">取消</button>
				</div>
			</div>
		</form>				
	</div>
	<div {{bind-attr class="showImg::hide"}}>
		<img class="progressBar" src="../web/apps/config/img/progress.gif" alt="进度条">
	</div>	
{{/view}}

{{#view view.Dialog
	id="iprepair_inner_Lib"
	title="内置库上传"
	class="config-modulel7-dialog1 hide"
	autoOpen=false
	modal=true
	buttons=dialogButtons}}
	<div id="dialog"  {{bind-attr class="showImg:hide"}}>
		<div {{bind-attr class=":alert alertType formTip::hide"}}><strong>{{formTip}}</strong></div>
		<form enctype="multipart/form-data" name="innerLibForm" id="innerLibForm" target="ipfixIframe">
			<div class="control-group">
				<label class="control-label">请上传.zip格式内置库文件:</label>
				<div class="controls">
					<div class="fileControls">
					  <input type="file" id="File1" name="soFile1" value="form.soFile" onChange="document.getElementById('FileText1').value = this.value;"   />
					</div>
					<input type="text"  id="FileText1" class="file-form-control"/>
					<span class="input-group-btn">
		              <button class="btn btn-default" onclick="document.getElementById('File1').click();"><span class="glyphicon glyphicon-search"></span>浏 览</button>
		            </span>
				</div>
			</div>
			<div class="control-group">
				<div class="controls">
					<button type="button" {{action "uploadInnerLib"}}   class="btn btn-primary">上传</button>
					<button type="button" {{action "closeDialog" "4"}} class="btn">取消</button>
				</div>
			</div>
		</form>	
	</div>	
	<div {{bind-attr class="showImg::hide"}}>
		<img class="progressBar" src="../web/apps/config/img/progress.gif" alt="进度条">
	</div>	
{{/view}}
<iframe name="ipfixIframe" hspace="0" vspace="0" frameborder="0" scrolling="no" src="#"  class="config-iframe-unshow"></iframe>
